<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>鼓励金购买</title>
    <script src="__INDEX__/js/mui.min.js"></script>
	<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/mall.css" />	
</head>
<style>
	.dzyhq_list .left { width: 35%;padding-left: 20px;}
	.dzyhq_list .center_left{width:13%; color:#ff6000; font-size: 1.6rem;}
	.dzyhq_list .center_right{width:12%; font-size: 1.6rem;}
	.dzyhq_list .right{width:40%;padding-right:15px;}
	.dzyhq_list li>div{
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    font-size: 1.2rem;
}
</style>
<body>
	<header class="mui-bar mui-bar-nav">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title">充值翻倍花，生活更省钱</h1>
	</header>
	<div class="mui-content gulijin_content">
	    <div class="dzyhq_top">
	    	<div class="dzyhq_tbox">
	    		<p class="glj_name"><em>鼓励金余额</em></p>
		    	<p class="pri">¥<em>{$info_user.score}</em></p>
				<p class="id">ID:{$info_user.id}</p>
				
	    	</div>
	    </div>
	    <div><img src="__INDEX__/images/bt_dzhyq.jpg"></div>
	    <ul class="dzyhq_list">
	    	<li data-val={$glj.one_money}>
				<div class="left">¥<em>{$glj.one_money}</em></div>
				<div class="center_left"><em>x{$user_ratio}</em></div>
				<div class="center_right"><em>=</em></div>
	    		<div class="right">
					<p class="num">{$glj.one_money*$user_ratio}</p>
    				<p>鼓励金</p>
	    		</div>
	    	</li>
	    	<li data-val={$glj.two_money}>
				<div class="left" >¥<em>{$glj.two_money}</em></div>
				<div class="center_left"><em>x{$user_ratio}</em></div>
				<div class="center_right"><em>=</em></div>
	    		<div class="right" >
					
					<p class="num">{$glj.two_money*$user_ratio}</p>
    				<p>鼓励金</p>
	    		</div>
	    	</li>
	    	<li data-val={$glj.three_money}>
				<div class="left" >¥<em>{$glj.three_money}</em></div>
				<div class="center_left"><em>x{$user_ratio}</em></div>
				<div class="center_right"><em>=</em></div>
	    		<div class="right" >
					
					<p class="num">{$glj.three_money*$user_ratio}</p>
    				<p>鼓励金</p>
	    		</div>
	    	</li>
	    	<li data-val={$glj.four_money}>
				<div class="left" >¥<em>{$glj.four_money}</em></div>
				<div class="center_left"><em>x{$user_ratio}</em></div>
				<div class="center_right"><em>=</em></div>
	    		<div class="right" >
				
					<p class="num">{$glj.four_money*$user_ratio}</p>
    				<p>鼓励金</p>
	    		</div>
	    	</li>
	    	<li data-val={$glj.five_money}>
				<div class="left" >¥<em>{$glj.five_money}</em></div>
				<div class="center_left"><em>x{$user_ratio}</em></div>
				<div class="center_right"><em>=</em></div>
	    		<div class="right" >
					<p class="num">{$glj.five_money*$user_ratio}</p>
    				<p>鼓励金</p>
	    		</div>
	    	</li>
	    </ul>
	    <form class="mui-input-group">
			<div class="mui-input-row mui-radio mui-left">
				<label class="dzyhq_xiey"><a href="xieyi.html?type=cz">鼓励金服务协议</a></label>
				<input name="checkbox" id="checkbox" value="Item 1" type="radio" >
			</div>
		</form>
	    <button type="button" id="btn" class="dzhy_nr">确定购买</button>
	</div>
	 <form id="my_form" class="layui-form update_form" action="{:url('member/to_pay')}" method="post">
	<input type="hidden" id="cz" name="cz" value="0" />
	</form>
</body>
{include file="public/footer" /}
<script>
	$(".dzyhq_list li").click(function(){
		$(".active").removeClass("active");
		$(this).addClass("active");
		$("#cz").val($(this).data('val'));
	})
	$("#btn").click(function(){
		var cz_money=$(".active").data("val");
		if(cz_money==undefined){
			layer.msg("请选择购买金额");
			return;
		}else{
			if($('#checkbox').is(':checked')==false) {
				    layer.msg('请阅读购买协议');
				    return;
			}
			var btnArray = ['不同意', '同意'];
				mui.confirm('鼓励金是一种电子优惠券,一经购买概不退回。您已知晓购买的鼓励金是用作消费时抵部分现金使用，并已确认了附近有合作实体店铺,如果附近没有实体店可供您消费,请勿购买', '鼓励金电子优惠券购买须知', btnArray, function(e) {
					 if (e.index == 1) {
					 	$("#my_form").submit();
					 }
			})
			$("#my_form").submit();
		}
		
	})
</script>
</html>
